/**
 * Filename DxResultVO.java 2021年02月27日
 * Copyright © Ehome Co.Ltd. All Rgiths Reserved.
 *
 * @author wuyingchao
 */
package com.ehome.poct.core.api.vo;

import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * 定性结果返回值
 *
 * @author wyc
 * @date 2021/02/27 17:59
 **/
@Data
@AllArgsConstructor
@NoArgsConstructor
@JsonInclude(JsonInclude.Include.NON_EMPTY)
@ApiModel("定性结果返回值")
public class DxResultVO {
    @ApiModelProperty("代码")
    private String codeName;
    @ApiModelProperty("检测名称")
    private String name;
    @ApiModelProperty("检测值")
    private String value;
    @ApiModelProperty("检测结果")
    private String result;
    @ApiModelProperty("检测指标")
    private List<StripKpisVO> kpis;

    public DxResultVO(List<Object> result) {
        this.codeName = result.get(0).toString();
        this.name = result.get(1).toString();
        this.value = result.get(2).toString();
        this.result = result.get(3).toString();
        this.kpis = (List<StripKpisVO>) result.get(4);
    }
}